<?php
require_once('../phplib/include.inc.php');

class Home_Shownews extends PageBase{
	public function Ini(){
		$a_id = intval(@$_REQUEST['a_id']);
		$this->GetArticle($a_id);
	}
	public function GetArticle($a_id){
		if($a_id == 0) return ;
		$db = getDb();
		$re = $db->fetchOne("SELECT a.*,b.cat_name FROM article AS a LEFT JOIN category AS b ON a.c_id=b.c_id WHERE a.a_id=$a_id");
		$this->assign("article",$re);
	}
}
$a = new Home_Shownews("file:".dirname(__FILE__)."/../home/shownews.tpl.html");
$a->display();
?>